$(function() {
	// 登陆框定位
	var right = ($(window).width() - 990) / 2;
	var top = ($('.banner').height() - 295) / 3;
	$('.login-box').css({
		top: top + 'px',
		right: right + 'px'
	});

	var href = location.href.substring(0, location.href.length - 10);
	$('.ok').on('click', function() {
		var user = $('.input-user').val();
		var pwd = $('.input-pwd').val();
		if ((user == 'user') && (pwd == '123456')) {
			location.href = href + 'personal.html';
		} else if ((user == 'seller') && (pwd == '123456')) {
			location.href = href + 'personal-sell.html';
		}else{
			alert('您输入的的用户名或密码错误！');
		}
	});
});